Repository navigation
[PAI-2161] feat(v2): work item subscribers - #70
Merged
akhil-vamshi-konam merged 2 commits intoNov 23, 2026
Merged
Conversation
Read a work item's subscribers and add or remove them, by project and id (workItems.subscribers) or by identifier (workspaces.workItems.*SubscribersByIdentifier), and from a loaded work item. The four operation ids are added to the generated constants by hand; regenerating pulls unrelated drift.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Linked to Plane Work Item(s) References This comment was auto-generated by Plane |
Prashant-Surya
pushed a commit
that referenced
this pull request
Nov 24, 2026
* fix: name the field errors in a v2 error's message (#67) * [PAI-2083] feat: dashboards and dashboard widgets on the v2 client (#61) * [WEB-7851] feat: dashboards and dashboard widgets on the v2 client Adds client.v2.workspaces.dashboards and its .widgets child for the new /api/v2/workspaces/{slug}/dashboards/ endpoints. - Dashboards: list, iterate, retrieve, create, update, delete, copy and widgetTypes. Rows come back as LoadedDashboard, which reaches dashboard.widgets with no ids repeated; a loaded workspace reaches workspace.dashboards. Every fields-taking method narrows its return type. - Widgets: CRUD plus chart() (page, column_page, row_ids) and charts() (every widget's first page in one call, per-widget status/error). - Models: Dashboard, Widget, their create/update/copy bodies, chart types, chart models, WidgetChart and WidgetChartResult. - Generated constants regenerated from the golden the SDK was built on (plane-ee a8a1a9f43be) plus only the dashboards paths; additions only. - Unit tests (nock), a live e2e suite, and the types-bundle snapshot. * [WEB-7851] fix: empty widget_ids short-circuit, free-text widget fields, filter docs - charts({ widget_ids: [] }) resolves to [] without a request; `?widget_ids=` used to chart every widget. - Widget read model: last_used_filter, x_axis_date_grouping and y_axis_metric are string | null (the server stores free text, "" included). Create/update bodies keep the literal unions. - TSDoc: charts() fails per widget for 400/402 but still rejects for errors about the dashboard itself; charts never read rich_filters; last_used_filter defaults to rich_filters and a pql-only create switches to pql_filters; changing a dashboard's access needs its owner; UpdateWidget takes null to clear the axis fields; the chart field is `schema` (Python: chart_schema). - Unit tests: empty widget_ids, pql-only widget create, null-clearing update, table paging with page/column_page. - Types-bundle snapshot updated for the Widget shape change. * [WEB-7851] docs: charts() per-widget errors include server errors * [WEB-7851] fix: review follow-ups on dashboards and widgets - e2e: dashboard cleanup logs a failed delete instead of swallowing it, like the project cleanup - WidgetChartResult.status: 200 or the error status (400, 402, 500, ...) - StoredWidgetChartType: note the list can grow on the server; handle an unknown value - Dashboard.access reads as number (older rows can carry the retired 2); writes keep 0 | 1 * [WEB-7851] fix: deep-review findings on dashboards and widgets - row_ids takes the table's null row ((string | null)[]); documents that row paging fields only echo the request when row_ids is sent - WidgetChartResult.error is the server's actual problem shape (type, code, detail, errors) - DashboardPqlFilters: send stripped (json optional); raw is gone, nothing on the server reads it - the pql-only auto-switch happens on update too, and can turn a rich-filter widget's filters off - 404 vs 403 described accurately; access default, admin rule and member removal on going public; copy copies older dashboards as stored; charts() documents the 50-widget cap - e2e cleanup no longer warns after a test deletes its own dashboard - tests: null row in row_ids, row_ids [], chart error rejects with PlaneApiError, charts() with no widget_ids, widgets.iterate * feat: change a workspace member's role (v1 and v2) (#66) * [PAI-2161] feat(v2): work item subscribers (#70) * [PAI-2161] feat(v2): work item subscribers Read a work item's subscribers and add or remove them, by project and id (workItems.subscribers) or by identifier (workspaces.workItems.*SubscribersByIdentifier), and from a loaded work item. The four operation ids are added to the generated constants by hand; regenerating pulls unrelated drift. * [PAI-2161] test(v2): work item subscribers --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
projects.workItems.subscribers.retrieve(slug, project, workItem)/.update(..., data)workspaces.workItems.retrieveSubscribersByIdentifier(slug, "ENG-12")/updateSubscribersByIdentifier(slug, "ENG-12", data)row.subscribers.retrieve()/.update(data)updatesends{ add?: string[], remove?: string[] }(at most 100 each). The API merges the change and answers the full list ({ subscriber_ids }), so callers never resend the list.Where to look
src/api/v2/WorkItems/Subscribers.ts— the per-project pair (exported asWorkItemSubscribersResource)src/api/v2/WorkspaceWorkItems.ts— the by-identifier pairsrc/models/v2/WorkItemSubscriber.ts—WorkItemSubscribers,UpdateWorkItemSubscribersWorkItems/index.ts,loaded/WorkItem.ts,api/v2/index.ts,models/v2/index.ts,generated/constants.ts, the export snapshot,tests/unit/v2/(2 files)Watch out for: the by-identifier pair sits on
workspaces.workItems, not onsubscribers.loaded-navigation.test.tsrequires every method of a work item's child to take that row's ids, andretrieveByIdentifieralready lives there. The Python SDK keeps all four onsubscribers.Proof
Important
Confidence: High — unit tests, plus a live run against a local Plane API
pnpm build(export snapshot matches),pnpm check:types,pnpm check:lint(0 errors, none of the existing warnings in touched files),pnpm check:format,pnpm test:unit(1063 passed). Live against a local API: both reads, add, remove, add+remove in one call, loaded navigation, a non-member → 400PlaneApiErrornamingadd.Rollout
MANAGE_WORK_ITEM_SUBSCRIBERSfeature (402 otherwise).Links
release-0.3.2(release: @makeplane/plane-node-sdk 0.3.2 #69). Python SDK is PAI-2160.